package com.workcenter.app;

import android.os.Bundle;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.workcenter.base.UIBase;

public class UIStatistics extends UIBase
{
   private TextView txtTopInfo;
   private ProgressBar pb1;
   private ProgressBar pb2;
   private ProgressBar pb3;
   private ProgressBar pb4;
   
   private void InitControls()
   {
	  txtTopInfo=(TextView)findViewById(R.id.txtTitle_toptoolbar_no_btn);
	  txtTopInfo.setText(getString(R.string.title_statistics));
	  pb1=(ProgressBar)findViewById(R.id.progressBar1);
	  pb2=(ProgressBar)findViewById(R.id.progressBar2);
	  pb3=(ProgressBar)findViewById(R.id.progressBar3);
	  pb4=(ProgressBar)findViewById(R.id.progressBar4);
	 
   }

// 动画效果
   void LoadingAnimation1()
   {
	  new Thread(new Runnable()
	  {
		 @Override
		 public void run()
		 {
			for (int i = 0; i < 80; i++)
			{
			   try
			   {
				  Thread.sleep(i);
			   }
			   catch (InterruptedException e)
			   {
				  
				  e.printStackTrace();
			   }
			   pb1.setProgress(i);
			}
		 }
	  }).start();
   }   
   
// 动画效果
   void LoadingAnimation2()
   {
	  new Thread(new Runnable()
	  {
		 @Override
		 public void run()
		 {
			for (int i = 0; i < 20; i++)
			{
			   try
			   {
				  Thread.sleep(i);
			   }
			   catch (InterruptedException e)
			   {
				  
				  e.printStackTrace();
			   }
			   pb2.setProgress(i);
			}
		 }
	  }).start();
   }
// 动画效果
   void LoadingAnimation3()
   {
	  new Thread(new Runnable()
	  {
		 @Override
		 public void run()
		 {
			for (int i = 0; i < 50; i++)
			{
			   try
			   {
				  Thread.sleep(i);
			   }
			   catch (InterruptedException e)
			   {
				  
				  e.printStackTrace();
			   }
			   pb3.setProgress(i);
			}
		 }
	  }).start();
   }
// 动画效果
   void LoadingAnimation4()
   {
	  new Thread(new Runnable()
	  {
		 @Override
		 public void run()
		 {
			for (int i = 0; i < 70; i++)
			{
			   try
			   {
				  Thread.sleep(i);
			   }
			   catch (InterruptedException e)
			   {
				  
				  e.printStackTrace();
			   }
			   pb4.setProgress(i);
			}
		 }
	  }).start();
   }
   @Override
   protected void onCreate(Bundle savedInstanceState)
   {
	  super.onCreate(savedInstanceState);
	  setContentView(R.layout.statistics);
	  InitControls();
	  LoadingAnimation1();
	  LoadingAnimation2();
	  LoadingAnimation3();
	  LoadingAnimation4();
   }

   
   
   
   
    
}
